FROM java:8-jdk

MAINTAINER BJB-VR

RUN mkdir -p /config
COPY /schedule/config /config
ADD /schedule/xr-schedule.jar /opt/xr-schedule.jar
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' >/etc/timezone

# 更新apt源
#RUN echo "deb [check-valid-until=no] http://cdn-fastly.deb.debian.org/debian jessie main" > /etc/apt/sources.list.d/jessie.list
#RUN echo "deb [check-valid-until=no] http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list
#RUN sed -i '/deb http:\/\/deb.debian.org\/debian jessie-updates main/d' /etc/apt/sources.list
#RUN apt-get -o Acquire::Check-Valid-Until=false update
#RUN apt-get install -y vim
#RUN apt-get install -y telnet
#RUN apt-get install -y net-tools

# PORT
EXPOSE 8087
EXPOSE 9089

#设置变量 JAVA_OPTS
ENV JAVA_OPTS="-Xmx256M -Xms256M -Xmn128M -XX:MaxMetaspaceSize=128M -XX:MetaspaceSize=128M"

#启动命令
ENTRYPOINT java ${JAVA_OPTS} -jar /opt/xr-schedule.jar
